package com.jacky.iot;


import org.eclipse.californium.core.CoapServer;
import org.eclipse.californium.core.network.CoapEndpoint;
import org.eclipse.californium.elements.tcp.netty.TcpServerConnector;

import java.net.InetSocketAddress;

public class StartUp {
    public static void main(String[] args) {
//
//
        final CoapServer coapServer = new CoapServer();
//
//        // 默认是udp实现传输层
        CoapEndpoint.Builder udpBuilder = new CoapEndpoint.Builder();
        udpBuilder.setInetSocketAddress(new InetSocketAddress("127.0.0.1",5683));

        coapServer.addEndpoint(udpBuilder.build());
    }
}